package com.bw.imgload_sdk;

import android.widget.ImageView;

import com.bumptech.glide.Glide;

import java.io.File;

public class LoadImgUtils {

    public static void loadMatchImg(String url, ImageView img){
        Glide.with(img.getContext()).load(url).placeholder(R.drawable.default_loading)
                .error(R.drawable.default_loading)
                .centerCrop()
                .into(img);
    }
    public static void loadFileImg(File file, ImageView img){
        Glide.with(img.getContext()).load(file).placeholder(R.drawable.default_loading)
                .error(R.drawable.default_loading)
                .centerCrop()
                .into(img);
    }
}
